package ilender.models;

import java.io.Serializable;
import java.util.List;

import org.joda.time.DateMidnight;

import lombok.*;

@Data @NoArgsConstructor @EqualsAndHashCode(callSuper=false)
public class MRequest extends BaseModel{
	private MUser facebook_user;
	private MCategory category;
	private String title;
	private DateMidnight until_date;
	private String description;
	private List<String> tags;

	public void setFacebook_user_id(long facebook_user_id){
		if(null==facebook_user || facebook_user.getId()!=facebook_user_id){
			facebook_user=new MUser();
			facebook_user.setId(facebook_user_id);
		}
	}
	public long getFacebook_user_id(){
		if(null==facebook_user)
			return 0;
		return facebook_user.getId();
	}

	public void setCategory_id(long category_id){
		if(null==category || category.getId()!=category_id){
			category=new MCategory();
			category.setId(category_id);
		}
	}
	public long getCategory_id(){
		if(null==category)
			return 0;
		return category.getId();
	}
}
